#ifndef PUMPFLOWCALIBRATIONPAGE_H
#define PUMPFLOWCALIBRATIONPAGE_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QTableView>
#include "tableviewex.h"
#include "modulehplcpumpdefine.h"

class PumpFlowCalibrationPage : public QWidget
{
    Q_OBJECT

public:
    explicit PumpFlowCalibrationPage(QWidget *parent = nullptr);
    ~PumpFlowCalibrationPage() override;

public slots:
    QList<hplc::PumpRateCalibData> getData();
    void onSetData(const QList<hplc::PumpRateCalibData> &list);

protected:
    virtual void closeEvent(QCloseEvent *event) override;

public slots:
    void onParseCompleted(int id, const QVariant &var);

private:
    TableViewEx      *m_tableView;

    QPushButton                 *m_pbWorkMode;
    QPushButton                 *m_pbSet;
    QPushButton                 *m_pbGet;

    // 加载参数
    QLabel *m_lbLoadRate;
    QLineEdit *m_leLoadRate;
    QHBoxLayout *m_hblLoadRate;
    QLabel *m_lbLoadRealRate;
    QLineEdit *m_leLoadRealRate;
    QHBoxLayout *m_hblLoadRealRate;
    QLabel *m_lbLoadPressure;
    QLineEdit *m_leLoadPressure;
    QHBoxLayout *m_hblLoadPressure;

    QPushButton	*m_pbSetLoadParam;
    QPushButton	*m_pbGetLoadParam;
    QHBoxLayout *m_hblLoadSetGet;

    QVBoxLayout *vblLoadParam;
};

#endif // PUMPFLOWCALIBRATIONPAGE_H
